<?php if (!defined('THINK_PATH')) exit(); /*a:4:{s:84:"/Users/sunxu/work/yuyi/daping/public/../application/admin/view/screen/data/edit.html";i:1731077266;s:72:"/Users/sunxu/work/yuyi/daping/application/admin/view/layout/default.html";i:1725591948;s:69:"/Users/sunxu/work/yuyi/daping/application/admin/view/common/meta.html";i:1725591948;s:71:"/Users/sunxu/work/yuyi/daping/application/admin/view/common/script.html";i:1725591948;}*/ ?>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
<title><?php echo (isset($title) && ($title !== '')?$title:''); ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="renderer" content="webkit">
<meta name="referrer" content="never">
<meta name="robots" content="noindex, nofollow">

<link rel="shortcut icon" href="/assets/img/favicon.ico" />
<!-- Loading Bootstrap -->
<link href="/assets/css/backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.css?v=<?php echo \think\Config::get('site.version'); ?>" rel="stylesheet">

<?php if(\think\Config::get('fastadmin.adminskin')): ?>
<link href="/assets/css/skins/<?php echo \think\Config::get('fastadmin.adminskin'); ?>.css?v=<?php echo \think\Config::get('site.version'); ?>" rel="stylesheet">
<?php endif; ?>

<!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
<!--[if lt IE 9]>
  <script src="/assets/js/html5shiv.js"></script>
  <script src="/assets/js/respond.min.js"></script>
<![endif]-->
<script type="text/javascript">
    var require = {
        config:  <?php echo json_encode($config ?? ''); ?>
    };
</script>

    </head>

    <body class="inside-header inside-aside <?php echo defined('IS_DIALOG') && IS_DIALOG ? 'is-dialog' : ''; ?>">
        <div id="main" role="main">
            <div class="tab-content tab-addtabs">
                <div id="content">
                    <div class="row">
                        <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
                            <section class="content-header hide">
                                <h1>
                                    <?php echo __('Dashboard'); ?>
                                    <small><?php echo __('Control panel'); ?></small>
                                </h1>
                            </section>
                            <?php if(!IS_DIALOG && !\think\Config::get('fastadmin.multiplenav') && \think\Config::get('fastadmin.breadcrumb')): ?>
                            <!-- RIBBON -->
                            <div id="ribbon">
                                <ol class="breadcrumb pull-left">
                                    <?php if($auth->check('dashboard')): ?>
                                    <li><a href="dashboard" class="addtabsit"><i class="fa fa-dashboard"></i> <?php echo __('Dashboard'); ?></a></li>
                                    <?php endif; ?>
                                </ol>
                                <ol class="breadcrumb pull-right">
                                    <?php foreach($breadcrumb as $vo): ?>
                                    <li><a href="javascript:;" data-url="<?php echo $vo['url']; ?>"><?php echo $vo['title']; ?></a></li>
                                    <?php endforeach; ?>
                                </ol>
                            </div>
                            <!-- END RIBBON -->
                            <?php endif; ?>
                            <div class="content">
                                <form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('Code'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-code" data-rule="required" class="form-control" name="row[code]" type="text" value="<?php echo htmlentities($row['code'] ?? ''); ?>">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('Title'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" class="form-control" name="row[title]" type="text" value="<?php echo htmlentities($row['title'] ?? ''); ?>">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('Desc'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-desc" class="form-control" name="row[desc]" type="text" value="<?php echo htmlentities($row['desc'] ?? ''); ?>">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('Type'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
                        
            <select  id="c-type" min="0" class="form-control selectpicker" name="row[type]">
                <?php if(is_array($typeList) || $typeList instanceof \think\Collection || $typeList instanceof \think\Paginator): if( count($typeList)==0 ) : echo "" ;else: foreach($typeList as $key=>$vo): ?>
                    <option value="<?php echo $key; ?>" <?php if(in_array(($key), is_array($row['type'])?$row['type']:explode(',',$row['type']))): ?>selected<?php endif; ?>><?php echo $vo; ?></option>
                <?php endforeach; endif; else: echo "" ;endif; ?>
            </select>

        </div>
    </div>

    <div class="form-group" data-favisible="type=1">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('Model_content'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-model_content" class="form-control editor" rows="5" name="row[model_content]" cols="50"><?php echo htmlentities($row['model_content'] ?? ''); ?></textarea>
        </div>
    </div>

    <div class="form-group" data-favisible="type=2">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('Sql_content'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-sql_content" class="form-control" rows="5" name="row[sql_content]" cols="50"><?php echo htmlentities($row['sql_content'] ?? ''); ?></textarea>
        </div>
    </div>

    <div class="form-group" data-favisible="type=3">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('Hook_name'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-hook_name" class="form-control" name="row[hook_name]" type="text" value="<?php echo htmlentities($row['hook_name'] ?? ''); ?>">
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('Params'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <table class="table table-responsive fieldlist" data-name="row[params]" data-template="paramstpl" data-tag="tr">
                <tr>
                    <td>参数</td>
                    <td>默认值</td>
                    <td>备注</td>
                    <td></td>
                </tr>
                <tr>
                    <td colspan="5"><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> 追加</a></td>
                </tr>
                <textarea name="row[params]" class="form-control hide" cols="30" rows="5"><?php echo $row['params']; ?></textarea>
            </table>
            <!--定义模板，模板语法使用Art-Template模板语法-->
            <script type="text/html" id="paramstpl">
                <tr class="form-inline">
                    <td><input type="text" name="row[<%=name%>][<%=index%>][key]" class="form-control" value="<%=row['key']%>" size="10"></td>
                    <td><input type="text" name="row[<%=name%>][<%=index%>][value]" class="form-control" value="<%=row['value']%>" size="10"></td>
                    <td><input type="text" name="row[<%=name%>][<%=index%>][name]" class="form-control" value="<%=row['name']%>" size="20"></td>
                    <td><span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span> <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span></td>
                </tr>
            </script>

        </div>
    </div>



    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('Tags'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-tags" class="form-control" data-role="tagsinput" name="row[tags]" type="text" value="<?php echo htmlentities($row['tags'] ?? ''); ?>">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('Result'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-result" class="form-control " readonly rows="5" name="row[result]" cols="50"><?php echo htmlentities($row['result'] ?? ''); ?></textarea>
        </div>
    </div>

    <input type="hidden" name="_method" id="method" value="">

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled"><?php echo __('OK'); ?></button>
            <button type="button" class="btn btn-warning  btn-test">运行</button>
        </div>
    </div>
</form>

                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <script src="/assets/js/require<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js" data-main="/assets/js/require-backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js?v=<?php echo htmlentities($site['version'] ?? ''); ?>"></script>
    </body>
</html>
